#ifndef DATE_H
#define DATE_H


class Date
{
    public:
        Date();
        virtual ~Date();
        Date(char strDate[]);
        Date(int Y,int M,int D);
        void setDate(int Y,int M,int D);
        void show()const;
        int getYear();
        void setYear(int Y);
        int getMonth();
        void setMonth(int M);
        int getDay();
        void setDay(int D);
        char* toString();
        int daysperMonth(int m=-1)const;
        int daysoerYear(int y=-1)const;
        int compare(const Date &date)const;
        int isLeapYear(int y=-1)const;
        int subDate(const Date&date)const;
        Date subDays(int days)const;
        Date addDays(int days)const;

    private:
        int year,month,day;
        void addOneDay();
        void subOneDay();
        int sSmallDate(const Date &dat)const;
};

#endif
